<?php 
session_start();
require_once dirname( __FILE__ ) . '/form-process.php';  
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
$action= $pageURL;
?>
<?php get_header(); ?>	
<div id="content">
	<div class="left">
<?php
if ($error != "") {
	if($error=="null")
	{
		echo "<script> alert ('Create new password successfully.'); </script>";
	}
	else
		echo "<p>".$error."</p>";
}
?>	
		<h2>Create New Password</h2>
        <div class="info">
		<p>Right now, please input your new password!</p>
		</div>
		<div class="question-form">
			<form id="create-new-password" name="create-new-password" method="post" action="<?=$action;?>" enctype="multipart/form-data">
			<input type="hidden" name="action" value="createnewpassword" />
				<?php wp_nonce_field('create-new-password'); ?>              
                <div class="text-publish2"> 
					<p style="float:left; margin-right:10px; width:100px;">New Password:*</p>
					<input name="pass1" type="password" id="pass1" class="input" size="35" autocomplete="off" />
                </div>					
				<div class="text-publish2">
					<p style="float:left; margin-right:10px; width:100px;">Confirm New Password:*</p>
					<input name="pass2" type="password" id="pass2" autocomplete="off" class="input" size="35" />
                </div>
                <input type="image" src="<?php echo get_bloginfo('template_directory'); ?>/images/createpass-btn.gif" id="submit_go" style="margin-left:120px;" onclick="submit()"  value="Create New Password" />										
            </form>
		</div> 
	</div> 
  <?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>
